abstract class Animal {
    public abstract void cry();
    public abstract String getAnimalName();
}
class Dog extends Animal {
    public void cry() {
        System.out.println("Woof Woof");
    }
    public String getAnimalName() {
        return "Dog";
    }
}
class Cat extends Animal {
    public void cry() {
        System.out.println("Meow Meow");
    }
    public String getAnimalName() {
        return "Cat";
    }
}
class Simulator {
    public void playSound(Animal animal) {
        System.out.println("The animal is a " + animal.getAnimalName());
        animal.cry();
    }
}
public class Application { 
    public static void main(String[] args) {
        Simulator simulator = new Simulator();
        simulator.playSound(new Dog());
        simulator.playSound(new Cat());
    }
}